UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MLbHS6BVoDrtffYKvQY0VufFH4cVlc/bRtMG6MOeoqM=' 
WHERE 
  key_id = '68d3ee572e28c3fc8269cc5428b085cd75a9e75206cf5661a0beb7f23208dac2' 
  AND (
    token = 'MLbHS6BVoDrtffYKvQY0VufFH4cVlc/bRtMG6MOeoqM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020