UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V2UlqMf1FYW+mki4o/IIUXir46rUll7EZ6tTW/cL6I0=' 
WHERE 
  key_id = '70584bc2e4fd64a4de21079e1ee3275c8ee4359197911fe60aa89fd6e0cce374' 
  AND (
    token = 'V2UlqMf1FYW+mki4o/IIUXir46rUll7EZ6tTW/cL6I0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049