UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hfcDuBd/76Z9Y51JSbtDK5JIk9YkVMJyA0ogzDB/pr8='
WHERE
key_id = 'c18671230e068a03f2da9166d6b13cc82931986da28d02c60ea4155dceba7f5a'
AND (
token = 'hfcDuBd/76Z9Y51JSbtDK5JIk9YkVMJyA0ogzDB/pr8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)