UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gv4FetTHhwXoxVPrfdjvPU4HTUwJ/Prsg9sMkQ/0zbg='
WHERE
key_id = '418aaedc4bdec2ac28f3c4e4c636e3f587ab6412c85f1a4d29689aef2446a5b5'
AND (
token = 'Gv4FetTHhwXoxVPrfdjvPU4HTUwJ/Prsg9sMkQ/0zbg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)