UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IM2Ttm7RYUaH+QZS/5kc8W3bOE/AxcQRBefH0wEqFgw=' 
WHERE 
  key_id = '35b10cfe6e188a26c580f62a2fd413bacc357f8f3670048cde9eed0893a7f128' 
  AND (
    token = 'IM2Ttm7RYUaH+QZS/5kc8W3bOE/AxcQRBefH0wEqFgw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027