UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jeqGbql2cK0B6IivXK+nDR7VQJIv5tWYfiRewQ2ek/8='
WHERE
key_id = 'a0e80c51c5ac324715308f00851060d9fee13bd2cf7564cc469a89d5106826d1'
AND (
token = 'jeqGbql2cK0B6IivXK+nDR7VQJIv5tWYfiRewQ2ek/8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)