UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Zl2Ewwg+SqIwuWD4etkwcS2d8QN0u1EsNM0OsgDn+X8=' 
WHERE 
  key_id = '2ebd9eacfc73e575fc20ae2fd77a2b69472bb2bbc8f61ff1ace6adf9db05832f' 
  AND (
    token = 'Zl2Ewwg+SqIwuWD4etkwcS2d8QN0u1EsNM0OsgDn+X8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033