UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2pV1OsW8wFe881rLe7039NFDny1apS1pW7z5/Zy9tZo='
WHERE
key_id = '468b1f36b55bbd1a3add96e1453bd78156c241b9ec9d7790fc2d8cc6484d454b'
AND (
token = '2pV1OsW8wFe881rLe7039NFDny1apS1pW7z5/Zy9tZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)