UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mvkekis/9vslk7BTpOaIpqgCFUbhVxZip/LZU2qY/nM='
WHERE
key_id = 'f2073f05165f7cc855eb0c51e5394bb99e172324f8b2a296342567522f7646aa'
AND (
token = 'Mvkekis/9vslk7BTpOaIpqgCFUbhVxZip/LZU2qY/nM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)