UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CSf9ieY3yXn1PQ/viInLAs8GlFsCr4g1STVGLKCQhTI=' 
WHERE 
  key_id = '9d44a35833fd207296a4bf8de6ab6382174e641cffe2aeb555279dfec111294d' 
  AND (
    token = 'CSf9ieY3yXn1PQ/viInLAs8GlFsCr4g1STVGLKCQhTI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032