UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LoTu3jr4fpYqjgFVLIvSzObGGb9pcZQ+GtpC1AJxyIA='
WHERE
key_id = '11e614d3c2bd73b2afbceb95565e114a3fb5b882fd99d39717b93c47477925f8'
AND (
token = 'LoTu3jr4fpYqjgFVLIvSzObGGb9pcZQ+GtpC1AJxyIA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)