UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jPS4FTGOlv15iRM4THgce3mq5R2zbt/IopWApFjGC+U='
WHERE
key_id = '44035a6afa6245b2494e52dc748475d49a4b976290ce8169c3c7d36506e8967e'
AND (
token = 'jPS4FTGOlv15iRM4THgce3mq5R2zbt/IopWApFjGC+U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)