UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SUC95zr6kqIDEC2GjuefQXO9gv5RcbaM8Oy9Fj3iTaY=' 
WHERE 
  key_id = '4e20ed3a2913e1eaef3a0c496f8af1e2f108f8082b69eeb4fbc78ec959dcd99f' 
  AND (
    token = 'SUC95zr6kqIDEC2GjuefQXO9gv5RcbaM8Oy9Fj3iTaY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040