UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/FBIArYaLHlQvchyW11Lk8WMyH7D/dXQ+Yuw/kbVf2g=' 
WHERE 
  key_id = 'd4630ba6d6e6248fcc79d2293c1ab73378c1baf78a1b0485e312fc7afe180c80' 
  AND (
    token = '/FBIArYaLHlQvchyW11Lk8WMyH7D/dXQ+Yuw/kbVf2g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033