UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2AQ3Quyteh0qcN2hLfAE/BuvgLxCj4VtfNLwMn8PMv8='
WHERE
key_id = '8f24e1aedf943b123545daed3826227563bd01d91a4eedd1bd8556102782032c'
AND (
token = '2AQ3Quyteh0qcN2hLfAE/BuvgLxCj4VtfNLwMn8PMv8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)