UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Ac6jwtA6+VdsRvPJvOr++jPbusL3fITdWA842u4Dw4o=' 
WHERE 
  key_id = '75eff1541600855337396ec92dd228b6074927c8ee3721a686cd9424cbf208b0' 
  AND (
    token = 'Ac6jwtA6+VdsRvPJvOr++jPbusL3fITdWA842u4Dw4o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033