UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/iyPFhZSuGz/w3osn5pbvehICptgj3l1Dq6a32pxWFA=' 
WHERE 
  key_id = '0b388f4128ad432f1081fb977f846fd4a0ccd0baed02f10f821d2162911d83b7' 
  AND (
    token = '/iyPFhZSuGz/w3osn5pbvehICptgj3l1Dq6a32pxWFA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041