UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8QhNe/hb5XzYzB3vq+uUfEWGxjcgd5kYtwbyBvFMRs0=' 
WHERE 
  key_id = 'f8713527bbe83fdf29012192bf556315885a336ea82fa101e40699763cfb9e92' 
  AND (
    token = '8QhNe/hb5XzYzB3vq+uUfEWGxjcgd5kYtwbyBvFMRs0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040