UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vV6YjfDoCHbBht1q1gj1u09A30+HZsIp7iC3Vc5YzKU=' 
WHERE 
  key_id = 'bd1c4d3c88f82ed4c1fff35116178a0905551ac3bc84808ab560d6559a6d69c4' 
  AND (
    token = 'vV6YjfDoCHbBht1q1gj1u09A30+HZsIp7iC3Vc5YzKU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039