UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FUz7Uw+PLqSxsTH73Ke91MzMLJbKdDUbVIFetXnM6fU='
WHERE
key_id = 'cb7256f33e947b1eb78debd4e7fbc528fa7233a9f7ec87ef5e4213dba9147938'
AND (
token = 'FUz7Uw+PLqSxsTH73Ke91MzMLJbKdDUbVIFetXnM6fU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)