UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vaj0i0ADGvxvLbPKfTi4a4gG+a2bzMUUwR55+kCM3Us=' 
WHERE 
  key_id = '3e7c2e3918e2967467544816fcddfde7a3430837fa5d56c1c6fe522d2138075b' 
  AND (
    token = 'Vaj0i0ADGvxvLbPKfTi4a4gG+a2bzMUUwR55+kCM3Us=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024