UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Okxtminu9aCAojp7APLAI+ZkGf80gGzq/lUdjNBLwRk=' 
WHERE 
  key_id = '9636687e8c59a712c20a500c731ae5ab47b8bd19a74bb25e45e7f4ece8715b71' 
  AND (
    token = 'Okxtminu9aCAojp7APLAI+ZkGf80gGzq/lUdjNBLwRk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043