UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q090JwXzoKorbCvwkXrqI8hdWKNHRLHqzdT26JQChdc='
WHERE
key_id = '27d8411188a7129b19c7c5e4a023c067329e1347a33cb59a4cac30d0f522c676'
AND (
token = 'Q090JwXzoKorbCvwkXrqI8hdWKNHRLHqzdT26JQChdc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)