UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+o6Chv/05NmteJbOz2ANZJDhM8B06t2GTuZnNL1pmZs='
WHERE
key_id = 'd6e0ff25d5389186c3a937970da5233f3b9f8df7c68ef1aa4a9843c803f0fe1c'
AND (
token = '+o6Chv/05NmteJbOz2ANZJDhM8B06t2GTuZnNL1pmZs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)