UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5xBwDkPb5+9Nat4005mJCrXhPePsQRFzDsCJC5J8Lh4=' 
WHERE 
  key_id = '0da1acba64d63a531e8e25431a320d0b63f4a3ae88b8ec30ea3b2b3a1655cb01' 
  AND (
    token = '5xBwDkPb5+9Nat4005mJCrXhPePsQRFzDsCJC5J8Lh4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027