UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's7IWkI9c7Z/AFDFBRwEwvDXv7Hf+7+XIpBvuoGIEdjg='
WHERE
key_id = '5aeb29a4fe93c1d1b4173116237414b9d654a87cf5fe73fba6b18a13f6e5054a'
AND (
token = 's7IWkI9c7Z/AFDFBRwEwvDXv7Hf+7+XIpBvuoGIEdjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)