UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rVaHPeyp/JeGxajX5PZNOuYuICQOh53cOYBp+YIQ6Nc='
WHERE
key_id = '0146c430b6ba3f949fa6fc283ab5e8bdad01ec9a8c51e9b05934b3a6d5f9855e'
AND (
token = 'rVaHPeyp/JeGxajX5PZNOuYuICQOh53cOYBp+YIQ6Nc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)