UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6KRch4FHf9mXxBb/rPwOtJ+XuPPZbik16MzTGmYKoNI=' 
WHERE 
  key_id = '35b115365736af95c84ede2032ad380da134ebd3fdc6d2ab9ac3a5cbc0f80b3e' 
  AND (
    token = '6KRch4FHf9mXxBb/rPwOtJ+XuPPZbik16MzTGmYKoNI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021