UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+rx6/CX9OizxcPY5BNU7I3c354SC2/97AEK/dyEXD/U='
WHERE
key_id = '2de8a796d5ceb6927f502e2d9453f6f527674b8a554a9f61c97a57a49ef78c20'
AND (
token = '+rx6/CX9OizxcPY5BNU7I3c354SC2/97AEK/dyEXD/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)