UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jLZ7elXS6xNsPQEAkBFBpLtrQ2fa0CeUnJH8EoVh3Es='
WHERE
key_id = 'e2ed815597970eda562f945e2a407517bc4f59a8bba15e705952262dec99235c'
AND (
token = 'jLZ7elXS6xNsPQEAkBFBpLtrQ2fa0CeUnJH8EoVh3Es='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)