UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v2Ccdk70VxiXi7laID2p782ERijeyokmDCCnuWmV7gQ='
WHERE
key_id = '3780e5fe2d6a44d637c6a780a107fa9cc45e520f60469c36d250a17c4753562b'
AND (
token = 'v2Ccdk70VxiXi7laID2p782ERijeyokmDCCnuWmV7gQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)