UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pyBhK5JtSz2VFTdBgIltSOaCEj5Rzjn+JP2sA0KNwjI='
WHERE
key_id = '7ea236e246efd4a41af9cc42ce1f36d8e439cb99a9a6dece9abfdf6e9c5f6b2f'
AND (
token = 'pyBhK5JtSz2VFTdBgIltSOaCEj5Rzjn+JP2sA0KNwjI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)