UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7+o0q65UPBiRkTnpd/+Omch77VOLuwdxJ3CykWnu4UQ='
WHERE
key_id = '9f9140792286aba42a102277fcced670a813dbb4f78d1b161bb60e6f0e2cac58'
AND (
token = '7+o0q65UPBiRkTnpd/+Omch77VOLuwdxJ3CykWnu4UQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)