UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Ror3/dAmAs9Bub0c+DiYXa9IpST4RXD2EdpDYRi9ZY='
WHERE
key_id = '7ca212be7cd63ec9fe445ef60c8a0966f06af15f28bebc2efc2b5c0c07c1b167'
AND (
token = '/Ror3/dAmAs9Bub0c+DiYXa9IpST4RXD2EdpDYRi9ZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)