UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o+3s/79tJ+hNXx65qapnb4nd9RQzEKPyKcLlQ/b0h9k='
WHERE
key_id = '8a35673724dc0c73485068343d29dbfe5e6c22c199ada6e299e721f1e6f6078e'
AND (
token = 'o+3s/79tJ+hNXx65qapnb4nd9RQzEKPyKcLlQ/b0h9k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)