UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jjxY/s9RDTMdk2fS6XN/JglV83Fmjw4XGSNkWE84Y4c='
WHERE
key_id = '8e7e2e3399412ac40c41b3488a7ae3946dff910895724ff23fc89c6ceb654672'
AND (
token = 'jjxY/s9RDTMdk2fS6XN/JglV83Fmjw4XGSNkWE84Y4c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)