UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2OoHt9HL3StFT1POWxe+4ZvyJ1WfBId4p3okYXraAJI='
WHERE
key_id = '1034874bf16fd30b89bb6ff44485d72ad74f02d75322c3eb318252cb5aca3d97'
AND (
token = '2OoHt9HL3StFT1POWxe+4ZvyJ1WfBId4p3okYXraAJI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)