UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RcuIgMQ186iJ1vpK/JwgkjXYLpsn4c3KkVSit4bslJ8=' 
WHERE 
  key_id = '9dce1a9fd0bc705a1ce527b3d6630c25cb032b410004936e20e829af32287037' 
  AND (
    token = 'RcuIgMQ186iJ1vpK/JwgkjXYLpsn4c3KkVSit4bslJ8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039