UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7GgoA/WxHMcoImFb7JXyhBY3LK82Kl2xw5UsxpfVHaI=' 
WHERE 
  key_id = '88fc7eb67c0b97315e298aab67ae7ea9ce62c1d084a2b832e5c1ab4f78dbf107' 
  AND (
    token = '7GgoA/WxHMcoImFb7JXyhBY3LK82Kl2xw5UsxpfVHaI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00086