UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WYVPhKKvwZ6tIQvPWr4913CE8aVtwQhJ0W3ME0N7bGk='
WHERE
key_id = 'ef69eb3b62be266d21c56ffc448ae450d2d2f21a4601b3393e4d1f4753a4f5a8'
AND (
token = 'WYVPhKKvwZ6tIQvPWr4913CE8aVtwQhJ0W3ME0N7bGk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)