UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3nQjOlFS0vQw3ZZ8JEqnIf0iqVP3tw37UcSqCZSwLJE='
WHERE
key_id = '75ccd9d0721d8c8e2e0da94a47070f643713e317bdd0aa9023ba37311b7c78dd'
AND (
token = '3nQjOlFS0vQw3ZZ8JEqnIf0iqVP3tw37UcSqCZSwLJE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)